<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function computed(str){
            let arr=str.split("")
            let arrs=arr.reverse()
            let aa=[]
            arrs.filter((item,index)=>{
                if(item==" "){

                }else{
                    aa.push(item)
                }
            })
             strs=aa[0]="啊"
             strs=aa[aa.length-1]="H"
             strs=aa[aa.length-6]="W"
            console.log(aa.join(''));
        }
        computed("holle world 我爱你！")
    </script>
</body>
</html>